package org.TUApp.eTour;
import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class Layers extends PreferenceActivity {

	//Option names and default values
  private static final String OPT_BUILDING = "B" ;
  private static final boolean OPT_BUILDING_DEF = true;
  private static final String OPT_PARKING = "P" ;
  private static final boolean OPT_PARKING_DEF = true;
  private static final String OPT_VISITOR = "V" ;
  private static final boolean OPT_VISITOR_DEF = true;
  private static final String OPT_STOP = "S" ;
  private static final boolean OPT_STOP_DEF = true;
  
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    addPreferencesFromResource(R.xml.layers);	
  }  
  
  /** Get the current value of the building option */
  public static boolean markBuilding(Context context) {
	  return PreferenceManager.getDefaultSharedPreferences(context)
	  		.getBoolean(OPT_BUILDING, OPT_BUILDING_DEF);
  }

  /** Get the current value of the parking log option */
  public static boolean markParking(Context context) {
	  return PreferenceManager.getDefaultSharedPreferences(context)
	  		.getBoolean(OPT_PARKING, OPT_PARKING_DEF);
  }
  /** Get the current value of the visitor parking option */
  public static boolean markVisitor(Context context) {
	  return PreferenceManager.getDefaultSharedPreferences(context)
	  		.getBoolean(OPT_VISITOR, OPT_VISITOR_DEF);
  }
  /** Get the current value of the shuttle stop option */
  public static boolean markStop(Context context) {
	  return PreferenceManager.getDefaultSharedPreferences(context)
	  		.getBoolean(OPT_STOP, OPT_STOP_DEF);
  }
  
}
